package dingcan;
import java.util.Scanner;
public class Test {
    public static void main(String[] args) throws Exception{
      int is = 0;
      //异常
        try {
            System.out.println("欢迎登陆ku38点餐系统");
            do {
                System.out.println("请选择你要的服务: 1,点餐  2,查看餐袋  3,签收  4,删除订单  5,点赞  6,退出");
                Scanner scanner = new Scanner(System.in);
                int choose = scanner.nextInt();
                switch (choose){
                    case 1:
                        System.out.println("序号"+"\t\t"+"菜名"+"\t\t\t"+"价格");
                        for (int i=0;i< File.menu.length;i++){
                            System.out.println(File.menu[i].getNumber()+"\t\t"+File.menu[i].getDishName()+"\t\t"+File.menu[i].getPrice());
                        }
                        File.indent.DianCan();
                        break;

                    case 2:
                        File.check.ChaKan();
                        break;

                    case 3:
                        File.check.QianShou();
                        break;

                    case 4:
                        File.check.ShanChu();
                        break;

                    case 5:
                        File.check.DianZan();
                        break;

                    case 6:
                        System.out.println("退出成功!");
                        is=1;
                        break;

                }
            }while (is==0);
//捕获异常
        }catch (Exception e){
            System.out.println("异常!");
        }
    }
}
